package com.stenio.fancat.service.enums;

/**
 * @author liuan
 * @create 2019-02-26 13:57
 */
public enum AccountStatus {

    ON(1,"正常"),
    OFF(0,"冻结");

    private int accountStatue;
    private String desc;

    AccountStatus(int accountStatue, String desc) {
        this.accountStatue = accountStatue;
        this.desc = desc;
    }

    public int getAccountStatus() {
        return accountStatue;
    }

    public String getDesc() {
        return desc;
    }

    public static AccountStatus getEnumByStatus(Integer i){
        for(AccountStatus accountStatue:AccountStatus.values()){
            if(accountStatue.getAccountStatus()==i){
                return accountStatue;
            }
        }
        return null;
    }
}
